package com.yuwei.live.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.image.glide.GlideImageLoader
import com.yuwei.live.R
import com.yuwei.live.entity.TopHotEntity

class TopHotAdapter: BaseQuickAdapter<TopHotEntity,BaseViewHolder>(
    R.layout.item_top_hot
) {
    override fun convert(holder: BaseViewHolder, item: TopHotEntity) {
        holder.setText(R.id.author_name,item.name)
        val imageView = holder.getView<ImageView>(R.id.top_hot_num)
        GlideImageLoader.loadResImage(imageView.context,item.num,imageView)
    }
}